home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / T / TC Prog Guide.cpt / picture ƒ / error.c < prev    next >
Text File  |  1990-10-08  |  898b  |  42 lines

  1. /*
  2. *    FILE:        error.c
  3. *    AUTHOR:        R. Gonzalez
  4. *    CREATED:    October 6, 1990
  5. *
  6. *    methods for error class, for reporting errors.
  7. */
  8.  
  9. # include    "error.h"
  10. # include    <stdlib.h>
  11. # include    <stdio.h>
  12. # include    <string.h>
  13.  
  14. /******************************************************************
  15. *    initialize
  16. ******************************************************************/
  17. boolean    Error::init(void)
  18. {
  19.     error_file = fopen("error.fil","w");
  20.     
  21.     return TRUE;
  22. }
  23.  
  24. /******************************************************************
  25. *    report error
  26. ******************************************************************/
  27. void    Error::report(char *error_string)
  28. {
  29.     fprintf(error_file,"%s\n",error_string);
  30. }
  31.  
  32. /******************************************************************
  33. *    destroy
  34. ******************************************************************/
  35. boolean    Error::destroy(void)
  36. {
  37.     fclose(error_file);
  38.             
  39.     return TRUE;
  40. }
  41.  
  42.